//
// Copyright © 2021 dev. All rights reserved.
// 

import Cocoa
import ConfCore
import os.log
final class AppCommandsReceiver {
    private let log = OSLog(subsystem: "io.wwdc.app", category: String(describing: AppCommandsReceiver.self))



}

extension WWDCAppCommand {
    var sessionId:String? {
        switch self {
        case .favorite(let id):
            return id
        case .unfavorite(let id):
            return id
        case .watch(let id):
            return id
        case .unwatch(let id):
            return id
        case .download(let id):
            return id
        case .cancelDownload(let id):
            return id
        case .revealVideo(let id):
            return id
        case .launchPreferences:
            return  nil
        }
    }

//    func session(in storage:Storage) -> Session? {
//        guard let id = sessionId else { return nil }
//        return storage
//    }
}
